package com.ionehe.group.common.io.jackson.converter;

import com.fasterxml.jackson.databind.util.StdConverter;
import java.util.Date;

/**
 * Copyright (c) 2020 ionehe.com
 * Date: 2020/9/22
 * Time: 下午10:35
 *
 * @author 2020年 <a href="mailto:a@ionehe.com">秀</a>
 */
public class JacksonDateToLong extends StdConverter<Date, Long> {
    private Date value;

    public JacksonDateToLong() {
    }

    @Override
    public Long convert(Date value) {
        this.value = value;
        return null != value ? value.getTime() : null;
    }
}
